package com.hzncc.scaffold.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.hzncc.scaffold.entity.Other.Libexerciserecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzncc.scaffold.entity.Bo.LibExerciseRecordBo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 练习记录表 Mapper 接口
 * </p>
 *
 * @author DrunkBear
 * @since 2022-04-27
 */
public interface LibexerciserecordMapper extends BaseMapper<Libexerciserecord> {


    @Select("SELECT\n" +
            "\t`id`,\n" +
            "\t`userId`,\n" +
            "\t`taskId`,\n" +
            "\t`exerciseTime`,\n" +
            "\t`questionCount`,\n" +
            "\t`rightCount`,\n" +
            "\t`wrongCount`,\n" +
            "\t`accuracy`,\n" +
            "\t`answer`,\n" +
            "\t`startTime`,\n" +
            "\t`endTime`,\n" +
            "\t`createTime` \n" +
            "FROM\n" +
            "\t`libexerciserecord` AS `libexerciserecord` ${ew.customSqlSegment}")
    public List<LibExerciseRecordBo> taskLibExerciseRecordList(@Param(Constants.WRAPPER) QueryWrapper queryWrapper);

}
